package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ThrowsDemo2 {
    public void dosome() throws IOException, AWTException{

    }
}
class Subclass extends ThrowsDemo2{
//    public void dosome() throws IOException,AWTException{
//
//    }//可以完全相同
//    public void dosome() { }//不抛出也可以
//    public void dosome() throws IOException{}//仅抛出部分异常
//    public  void dosome() throws FileNotFoundException{}//抛出超类声明的子类型异常

//    public void dosome() throws IllegalAgeException{}不允许抛出额外异常
//    public void dosome() throws Exception {} 不允许抛出超类方法抛出异常的超类型异常
}
